home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / passwd.preinst < prev    next >
Text File  |  2009-07-31  |  1KB  |  52 lines

  1. #! /bin/sh
  2.  
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <new-preinst> `install'
  10. #        * <new-preinst> `install' <old-version>
  11. #        * <new-preinst> `upgrade' <old-version>
  12. #        * <old-preinst> `abort-upgrade' <new-version>
  13. #
  14. # for details, see http://www.debian.org/doc/debian-policy/ or
  15. # the debian-policy package
  16.  
  17. remove_md5() {
  18.     if md5sum $1 2>/dev/null |grep -q $2; then
  19.     cp $1 $1.pre-upgrade
  20.     sed -e '/^[^#]*[ \t]*password[ \t]*required[ \t]*pam_unix.so/ s/ md5$//' $1 >$1.post-upgrade \
  21.         && mv $1.post-upgrade $1
  22.     fi
  23.     }
  24.  
  25.  
  26. case "$1" in
  27.     install|upgrade)
  28.         if [ "x$2" != "x" ] ; then
  29.         if dpkg --compare-versions $2 lt 1:4.0.3 ; then
  30.         remove_md5 /etc/pam.d/passwd 23a5d1465bbc1e39ca6e0c32f22a75c9
  31.         fi
  32.     fi
  33.     ;;
  34.  
  35.     abort-upgrade)
  36.     ;;
  37.  
  38.     *)
  39.         echo "preinst called with unknown argument \`$1'" >&2
  40.         exit 1
  41.     ;;
  42. esac
  43.  
  44. # dh_installdeb will replace this with shell code automatically
  45. # generated by other debhelper scripts.
  46.  
  47.  
  48.  
  49. exit 0
  50.  
  51.  
  52.